#include <iostream>
using namespace std;

class student_t {
  public:
    const char *m_name;
    const int   m_age;
    float       m_score;

  public:
    student_t(const char *name, const int age, float score);
    void show();
    // 声明常成员函数
    const char *getname() const;
    int         getage() const;
    float       getscore() const;
};

student_t::student_t(const char *name, const int age, float score) : m_name(name), m_age(age), m_score(score)
{
}
void student_t::show()
{
    cout << m_name << "的年龄是" << m_age << "，成绩是" << m_score << endl;
}

// 定义常成员函数
const char *student_t::getname() const
{
    return m_name;
}
int student_t::getage() const
{
    return m_age;
}
float student_t::getscore() const
{
    return m_score;
}

int main()
{
    // 创建匿名对象
    (new student_t("小明", 15, 90))->show();
    return 0;
}
